package com.hfkh;

import java.util.Scanner;

/**
 * @Author MDD
 * @Description
 * @Version
 * @Date
 **/
public class No_1 {
    public static void main(String[] args) {
        Scanner sc= new Scanner(System.in);
        int score;
        int sum,max,min;
        sum = max = min = 0;

        double avg = 0;
        for (int i = 1; i <= 3 ; i++) {
            System.out.println("请输入第"+i+"个班级的每个人的成绩");
            for (int j = 1; j <= 5 ; j++) {
                System.out.print("请输入第"+j+"人的成绩：");
                score = sc.nextInt();
                sum += score;
                avg = sum /5;
                if(i==1){
                    min = score;
                }

                if (score>max) {
                    max = score;
                }
                if (score<min){
                    min = score;
                }
            }
            System.out.print("第"+i+"班的总分是："+sum+"\n");
            System.out.print("平均分是："+avg+"\n");
            System.out.print("最大值："+max+"\t最小值："+min+"\n");
        }

    }
}
